#!/bin/bash
#

##掏空金字塔

read -p "输入行数：" n

for i in $(seq $n); do
    if [ $i -ne $n ]; then
	for ((m=i; m<n; m++)); do
	    echo -n " "
	done
        echo -n "*"
        for ((p=1; p<=(2*i-3) ;p++));do
	    echo -n " "
        done
        if [ $i -gt 1 ]; then
       	    echo -n "*"
        fi
    else
	for ((r=1; r<=(2*i-1); r++)); do
	    echo -n "*"
	done
    fi
    echo ""
done

